package org.oneblog.interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

public class BlogInterceptor extends HandlerInterceptorAdapter  {

	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
			throws Exception {
	    request.setAttribute("_blogTitle", "一个年过半甲的程序员");
		request.setAttribute("_keyword", "个人博客,wjyuian,技术博客,程序员,OOM,OOMabc,电商搜索引擎,招聘搜索引擎,招聘行业软件架构");
        request.setAttribute("_description", "wjyuian,技术博客,程序员的个人技术博客,电子商务领域垂直搜索引擎开发,推荐系统开发,招聘行业搜索引擎开发,软件架构,简历归一服务");
		return super.preHandle(request, response, handler);
	}

	@Override
	public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
		super.afterCompletion(request, response, handler, ex);
	}

	@Override
	public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
		super.postHandle(request, response, handler, modelAndView);
	}
}
